package com.swak.algs.array;

public class Compares {

	public static boolean isEquals(int[][] anss) {
		if (anss.length <= 1) {
			return true;
		}

		/*
		 * 0 1
		 * 1 2
		 * 2 3
		 * 3 4
		 */
		for (int i = 0; i < anss.length - 1; i++) {
			boolean isEquals = isEquals(anss[i], anss[i + 1]);
			if (!isEquals) {
				return false;
			}
		}
		return true;
	}

	public static boolean isEquals(int[] ans1, int[] ans2) {
		if (!(ans1 != null & ans2 != null & ans1.length == ans2.length)) {
			return false;
		}
		int N = ans1.length;
		for (int i = 0; i <= N - 1; i++) {
			if (ans1[i] != ans2[i]) {
				return false;
			}
		}
		return true;
	}
}
